package com.zs.server;

import com.zs.device.Device;
import com.zs.listener.MyListener;

public class Server {
	public Server(){
		ClientService socketService=new ClientService();
		socketService.initSocket();
	}
	
	
	public void run() throws InterruptedException{
		
		Device device=new Device("iphone");
		Object obj=new Object();
		device.setCallBack(new MyListener(obj));
		device.sendMessage("hello world");
		synchronized (obj) {
			System.out.println("等待回调....");
			obj.wait();
		}
		
	}
	
	

}
